Optimal. Leaf size=134 \[ \frac {2 e (a+b x)^3 (b d-a e) \left (a^2+2 a b x+b^2 x^2\right )^p}{b^3 (2 p+3)}+\frac {(a+b x)^2 (b d-a e)^2 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (p+1)}+\frac {e^2 (a+b x)^4 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (p+2)} \]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {770, 21, 43} \begin {gather*} \frac {2 e (a+b x)^3 (b d-a e) \left (a^2+2 a b x+b^2 x^2\right )^p}{b^3 (2 p+3)}+\frac {(a+b x)^2 (b d-a e)^2 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (p+1)}+\frac {e^2 (a+b x)^4 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (p+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 43
Rule 770
Rubi steps
\begin {align*} \int (a+b x) (d+e x)^2 \left (a^2+2 a b x+b^2 x^2\right )^p \, dx &=\left (\left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int (a+b x) \left (a b+b^2 x\right )^{2 p} (d+e x)^2 \, dx\\ &=\frac {\left (\left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int \left (a b+b^2 x\right )^{1+2 p} (d+e x)^2 \, dx}{b}\\ &=\frac {\left (\left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int \left (\frac {(b d-a e)^2 \left (a b+b^2 x\right )^{1+2 p}}{b^2}+\frac {2 e (b d-a e) \left (a b+b^2 x\right )^{2+2 p}}{b^3}+\frac {e^2 \left (a b+b^2 x\right )^{3+2 p}}{b^4}\right ) \, dx}{b}\\ &=\frac {(b d-a e)^2 (a+b x)^2 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (1+p)}+\frac {2 e (b d-a e) (a+b x)^3 \left (a^2+2 a b x+b^2 x^2\right )^p}{b^3 (3+2 p)}+\frac {e^2 (a+b x)^4 \left (a^2+2 a b x+b^2 x^2\right )^p}{2 b^3 (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 109, normalized size = 0.81 \begin {gather*} \frac {\left ((a+b x)^2\right )^{p+1} \left (a^2 e^2-2 a b e (d (p+2)+e (p+1) x)+b^2 \left (d^2 \left (2 p^2+7 p+6\right )+4 d e \left (p^2+3 p+2\right ) x+e^2 \left (2 p^2+5 p+3\right ) x^2\right )\right )}{2 b^3 (p+1) (p+2) (2 p+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.34, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x) (d+e x)^2 \left (a^2+2 a b x+b^2 x^2\right )^p \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.45, size = 353, normalized size = 2.63 \begin {gather*} \frac {{\left (2 \, a^{2} b^{2} d^{2} p^{2} + 6 \, a^{2} b^{2} d^{2} - 4 \, a^{3} b d e + a^{4} e^{2} + {\left (2 \, b^{4} e^{2} p^{2} + 5 \, b^{4} e^{2} p + 3 \, b^{4} e^{2}\right )} x^{4} + 4 \, {\left (2 \, b^{4} d e + a b^{3} e^{2} + {\left (b^{4} d e + a b^{3} e^{2}\right )} p^{2} + {\left (3 \, b^{4} d e + 2 \, a b^{3} e^{2}\right )} p\right )} x^{3} + {\left (6 \, b^{4} d^{2} + 12 \, a b^{3} d e + 2 \, {\left (b^{4} d^{2} + 4 \, a b^{3} d e + a^{2} b^{2} e^{2}\right )} p^{2} + {\left (7 \, b^{4} d^{2} + 22 \, a b^{3} d e + a^{2} b^{2} e^{2}\right )} p\right )} x^{2} + {\left (7 \, a^{2} b^{2} d^{2} - 2 \, a^{3} b d e\right )} p + 2 \, {\left (6 \, a b^{3} d^{2} + 2 \, {\left (a b^{3} d^{2} + a^{2} b^{2} d e\right )} p^{2} + {\left (7 \, a b^{3} d^{2} + 4 \, a^{2} b^{2} d e - a^{3} b e^{2}\right )} p\right )} x\right )} {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p}}{2 \, {\left (2 \, b^{3} p^{3} + 9 \, b^{3} p^{2} + 13 \, b^{3} p + 6 \, b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.32, size = 903, normalized size = 6.74 \begin {gather*} \frac {2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} p^{2} x^{4} e^{2} + 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d p^{2} x^{3} e + 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d^{2} p^{2} x^{2} + 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} p^{2} x^{3} e^{2} + 5 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} p x^{4} e^{2} + 8 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d p^{2} x^{2} e + 12 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d p x^{3} e + 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d^{2} p^{2} x + 7 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d^{2} p x^{2} + 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} p^{2} x^{2} e^{2} + 8 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} p x^{3} e^{2} + 3 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} x^{4} e^{2} + 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} d p^{2} x e + 22 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d p x^{2} e + 8 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d x^{3} e + 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} d^{2} p^{2} + 14 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d^{2} p x + 6 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} b^{4} d^{2} x^{2} + {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} p x^{2} e^{2} + 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} x^{3} e^{2} + 8 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} d p x e + 12 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d x^{2} e + 7 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} d^{2} p + 12 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a b^{3} d^{2} x - 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{3} b p x e^{2} - 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{3} b d p e + 6 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{2} b^{2} d^{2} - 4 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{3} b d e + {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} a^{4} e^{2}}{2 \, {\left (2 \, b^{3} p^{3} + 9 \, b^{3} p^{2} + 13 \, b^{3} p + 6 \, b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 179, normalized size = 1.34 \begin {gather*} \frac {\left (b x +a \right )^{2} \left (2 b^{2} e^{2} p^{2} x^{2}+4 b^{2} d e \,p^{2} x +5 b^{2} e^{2} p \,x^{2}-2 a b \,e^{2} p x +2 b^{2} d^{2} p^{2}+12 b^{2} d e p x +3 e^{2} x^{2} b^{2}-2 a b d e p -2 a b \,e^{2} x +7 b^{2} d^{2} p +8 b^{2} d e x +a^{2} e^{2}-4 a b d e +6 b^{2} d^{2}\right ) \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p}}{2 \left (2 p^{3}+9 p^{2}+13 p +6\right ) b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.64, size = 404, normalized size = 3.01 \begin {gather*} \frac {{\left (b x + a\right )} {\left (b x + a\right )}^{2 \, p} a d^{2}}{b {\left (2 \, p + 1\right )}} + \frac {{\left (b^{2} {\left (2 \, p + 1\right )} x^{2} + 2 \, a b p x - a^{2}\right )} {\left (b x + a\right )}^{2 \, p} d^{2}}{2 \, {\left (2 \, p^{2} + 3 \, p + 1\right )} b} + \frac {{\left (b^{2} {\left (2 \, p + 1\right )} x^{2} + 2 \, a b p x - a^{2}\right )} {\left (b x + a\right )}^{2 \, p} a d e}{{\left (2 \, p^{2} + 3 \, p + 1\right )} b^{2}} + \frac {2 \, {\left ({\left (2 \, p^{2} + 3 \, p + 1\right )} b^{3} x^{3} + {\left (2 \, p^{2} + p\right )} a b^{2} x^{2} - 2 \, a^{2} b p x + a^{3}\right )} {\left (b x + a\right )}^{2 \, p} d e}{{\left (4 \, p^{3} + 12 \, p^{2} + 11 \, p + 3\right )} b^{2}} + \frac {{\left ({\left (2 \, p^{2} + 3 \, p + 1\right )} b^{3} x^{3} + {\left (2 \, p^{2} + p\right )} a b^{2} x^{2} - 2 \, a^{2} b p x + a^{3}\right )} {\left (b x + a\right )}^{2 \, p} a e^{2}}{{\left (4 \, p^{3} + 12 \, p^{2} + 11 \, p + 3\right )} b^{3}} + \frac {{\left ({\left (4 \, p^{3} + 12 \, p^{2} + 11 \, p + 3\right )} b^{4} x^{4} + 2 \, {\left (2 \, p^{3} + 3 \, p^{2} + p\right )} a b^{3} x^{3} - 3 \, {\left (2 \, p^{2} + p\right )} a^{2} b^{2} x^{2} + 6 \, a^{3} b p x - 3 \, a^{4}\right )} {\left (b x + a\right )}^{2 \, p} e^{2}}{2 \, {\left (4 \, p^{4} + 20 \, p^{3} + 35 \, p^{2} + 25 \, p + 6\right )} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.27, size = 355, normalized size = 2.65 \begin {gather*} {\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^p\,\left (\frac {a^2\,\left (a^2\,e^2-2\,a\,b\,d\,e\,p-4\,a\,b\,d\,e+2\,b^2\,d^2\,p^2+7\,b^2\,d^2\,p+6\,b^2\,d^2\right )}{2\,b^3\,\left (2\,p^3+9\,p^2+13\,p+6\right )}+\frac {x^2\,\left (2\,a^2\,b^2\,e^2\,p^2+a^2\,b^2\,e^2\,p+8\,a\,b^3\,d\,e\,p^2+22\,a\,b^3\,d\,e\,p+12\,a\,b^3\,d\,e+2\,b^4\,d^2\,p^2+7\,b^4\,d^2\,p+6\,b^4\,d^2\right )}{2\,b^3\,\left (2\,p^3+9\,p^2+13\,p+6\right )}+\frac {2\,e\,x^3\,\left (p+1\right )\,\left (a\,e+2\,b\,d+a\,e\,p+b\,d\,p\right )}{2\,p^3+9\,p^2+13\,p+6}+\frac {a\,x\,\left (-a^2\,e^2\,p+2\,a\,b\,d\,e\,p^2+4\,a\,b\,d\,e\,p+2\,b^2\,d^2\,p^2+7\,b^2\,d^2\,p+6\,b^2\,d^2\right )}{b^2\,\left (2\,p^3+9\,p^2+13\,p+6\right )}+\frac {b\,e^2\,x^4\,\left (2\,p^2+5\,p+3\right )}{2\,\left (2\,p^3+9\,p^2+13\,p+6\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________